package com.hooper.project.rpc;

import com.hooper.api.common.service.UserInterfaceInfoService4Dubbo;
import com.hooper.project.service.UserInterfaceInfoService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author Tim Hooper
 * @version 1.0
 * @time 2023/04/12/22:58
 */
@DubboService(timeout = 2000)
@Component
public class UserInterfaceInfoService4DubboImpl implements UserInterfaceInfoService4Dubbo {

    @Resource
    private UserInterfaceInfoService userInterfaceInfoService;

    public boolean invokeCount(Long interfaceInfoId, Long userId){
        return userInterfaceInfoService.callInterface(interfaceInfoId, userId);
    }

}
